package com.lin.sunnyweather

import android.app.Application
import android.content.Context
import com.lin.sunnyweather.utils.CrashUtil

/**
 * 自定义Application
 */
class SunnyWeatherApplication : Application() {

    companion object {
        const val TOKEN = BuildConfig.TOKEN
        lateinit var context: Context
    }

    override fun onCreate() {
        super.onCreate()
        context = applicationContext

        //全局异常处理
        Thread.setDefaultUncaughtExceptionHandler(CrashUtil)
    }
}